package com.example.testdemo.horizontal_image_list;

import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.example.testdemo.R;
import com.example.testdemo.home.BaseActivity;

/**
 * Created by 颜 on 05.08.008.
 *
 */

public class HorizontalActivity extends BaseActivity {
    private RecyclerView recyclerView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_horizontal);
        recyclerView = findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false));
        MyAdapter myAdapter = new MyAdapter();
        recyclerView.setAdapter(myAdapter);
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
        myAdapter.addData("dsdf");
    }


}
